<template>
	<view class="container">
		<view class="p_8">
			<view class="height_104 br_6 fx fx_col aic jcc fc_fff"
				style="background: linear-gradient(225deg, #FEAD27 0%, #FF961A 100%);">
				<view class="fz_24 fb">
					¥{{dataInfo.historyTotal||0}}
				</view>
				<view class="mt_8">
					历史累计提现
				</view>
			</view>
		</view>
		<view class="bc_fff">
			<view class="ptb_8 plr_16 fx jcb" v-for="item,index in dataInfo.financeLegumesCashOutEntityList"
				:key="index">
				<view>
					<view :class="[statusClass(item)]">
						{{item.status==1?'待处理':'已处理'}}
					</view>
					<view class="fc_999 mt_4">
						{{item.updateTime||''}}
					</view>
				</view>
				<view class="fc_primary">
					￥{{item.legumesNum||0}}
				</view>
			</view>
		</view>
		<Empty type="record" v-if="!loading&&!dataInfo.financeLegumesCashOutEntityList.length" />
	</view>
</template>

<script>
	import api from '@/service/config/api'
	import Empty from '@/components/Empty'
	export default {
		components: {
			Empty
		},
		data() {
			return {
				dataInfo: {},
				loading: true,
				listUrl: '/user/api/myLegumes/myOutPage',
			}
		},
		computed: {
			statusClass() {
				return item => item.status == 1 ? 'fc_primary' : ''
			}
		},
		onLoad(options) {
			this.getData()
		},
		methods: {
			getData() {
				this.loading = true
				api.post('/user/api/myLegumes/myOutPage',{
					size: 100,
					current: 1,
				}).then(res => {
					this.dataInfo = res.data
				}).finally(() => {
					this.loading = false
				})
			},
		},
	}
</script>

<style lang="scss">
	.container {}
</style>